package com.travel.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 
 * @TableName cars
 */
@TableName(value ="cars")
@Data
@Document(indexName = "cars")
@NoArgsConstructor
@AllArgsConstructor
public class Cars implements Serializable {
    /**
     * 汽车id
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * 汽车名
     */
    @TableField(value = "carName")
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    private String carName;

    /**
     * 汽车类型
     */
    @TableField(value = "car_type")
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    private String carType;

    /**
     * 座位数量
     */
    @TableField(value = "seats")
    private Integer seats;

    /**
     * 车门数量
     */
    @TableField(value = "doors")
    private Integer doors;

    /**
     * 手动挡还是自动挡
     */
    @TableField(value = "driving_style")
    private String drivingStyle;

    /**
     * 发动机排量
     */
    @TableField(value = "engine_capacity")
    private Double engineCapacity;

    /**
     * 汽车品牌
     */
    @TableField(value = "car_brand")
    private String carBrand;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}